home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / e / experiment4codersdisk3.dms / experiment4codersdisk3.adf / catchguru.s < prev    next >
Text File  |  1992-09-02  |  1KB  |  83 lines

  1.         section    killguru,code
  2.  
  3. _LVOForbid        equ    -$84
  4. _LVODisplayAlert    equ    -$5A
  5. _LVOCloseLibrary    equ    -$19E
  6. _LVOOutput        equ    -$3C
  7. _LVOWrite        equ    -$30
  8. _LVOPermit        equ    -$8A
  9. _LVOOpenLibrary        equ    -$228
  10.  
  11. Forbid        move.l    4.w,a6
  12.         jsr    _LVOForbid(a6)
  13.  
  14.         lea    OldExc,a0
  15.         lea    0.w,a1
  16.         moveq    #32-1,d0
  17. copyold        move.l    (a1)+,(a0)+
  18.         dbra    d0,copyold
  19.  
  20.         lea    OldHRegs,a5
  21.         lea    $DFF000,a6
  22.         move.l    2(a6),(a5)
  23.         move.l    $1C(a6),4(a5)
  24.  
  25.         move.l    4.w,a6
  26.         lea    GfxName(pc),a1
  27.         jsr    -408(a6)
  28.         move.l    d0,16(a5)
  29.         move.l    d0,a1
  30.         jsr    _LVOCloseLibrary(a6)
  31.  
  32.         lea    8.w,a0
  33.         move.l    #Err2,(a0)+    ;bus
  34.         move.l    #Err2,(a0)+    ;adr
  35.         move.l    #Err1,(a0)+    ;illeg
  36.         move.l    #Err1,(a0)+    ;divu
  37.         lea    $3c.w,a0
  38.         move.l    #Err1,(a0)
  39.         lea    $60.w,a0
  40.         move.l    #Err2,(a0)
  41.  
  42.         move.l    4.w,a6
  43.         jsr    _LVOPermit(a6)
  44.         lea    Forbid(pc),a0
  45.         clr.l    -(a0)
  46.         moveq    #0,d0
  47.         rts
  48.  
  49. Err2        lea    8(sp),sp
  50.         bra.s    Exit2Dos
  51.  
  52. Err1        lea    OldHRegs(pc),a5
  53.         lea    $DFF000,a6
  54.         move.w    #$7FFF,$96(a6)
  55.         move.w    #$7FFF,$9A(a6)
  56.         lea    OldInt(pc),a0
  57.         lea    $64.w,a1
  58.         moveq    #7-1,d0
  59. copyint        move.l    (a0)+,(a1)+
  60.         dbra    d0,copyint
  61.         move.w    (a5),d0
  62.         or.w    #$8000,d0
  63.         move.w    d0,$96(a6)
  64.         move.w    4(a5),d0
  65.         or.w    #$8000,d0
  66.         move.w    d0,$9A(a6)
  67.         move.l    $10(a5),a0
  68.         move.l    $26(a0),$80(a6)
  69.         clr.w    $88(a6)
  70.  
  71. Exit2Dos    lea    ExitDos(pc),a0
  72.         move.l    a0,2(sp)
  73.         rte
  74.  
  75. ExitDos        moveq    #0,d0
  76.         rts
  77.  
  78. GfxName        dc.b    'graphics.library',0
  79.         even
  80. OldExc        ds.l    25
  81. OldInt        ds.l    7
  82. OldHRegs    ds.l    5
  83.